/*Создание папки в /home/user/текущ.дата и время
 */

import java.io.*;
import java.util.*;
import java.text.*;

class CreateDirectory
{
    String Date()
    {
         // the correct way to get today's date

        Date today = Calendar.getInstance().getTime();

        //System.out.println(today);

        String today_s=String.valueOf(today);

        return today_s;
       

    }
       String date_today()
    {

     Date dNow = new Date( );
     SimpleDateFormat ft =new SimpleDateFormat ("yyyy_MM_dd");

     //System.out.println(ft.format(dNow));

     return ft.format(dNow);

    }

  public static void main(String args[])
   {
     CreateDirectory dt=new CreateDirectory();
     
   try {
String strDirectoy = "/home/user/"+dt.date_today(); ;
   //String strManyDirectories= "dir1/dir2/dir3" ;

   // Create one directory
   boolean success = (
new File(strDirectoy)).mkdir();
   if (success) {
   System.out.println( "Directory: "
+ strDirectoy + " created" ) ;
   }
   /* Create multiple directories
   success = ( new File(strManyDirectories)).mkdirs();
   if (success) {
   System.out.println( "Directories: "
+ strManyDirectories + " created" );
   }*/

  } catch (Exception e){ //Catch exception if any
   System.err.println( "Error: " + e.getMessage());
  }

}
}